import org.omg.CORBA.*;

public class Listener extends Thread {
	private ORB orb;
	private boolean stop = false;
	
	public Listener(ORB orb) {
		this.orb = orb;
	}
	
	public void run() {
		while(!stop) {
			orb.run();
		}
	}
	
	public void stopListening() {
		stop = true;
		orb.shutdown(false);
	}
}